{% extends 'layout.twig' %}

{% macro menuitem(image, action) %}
    {% if action is not null %}
        <a href="{{ action }}" onclick="load_img();">
            <img src="{{ image }}">
        </a>
    {% else %}
        <img src="{{ image }}">
    {% endif %}
{% endmacro %}

{% block header %}
    {% include('header.twig') %}
{% endblock %}

{% block content %}
    {% import _self as menu %}
    <div id="menu">
        {{ menu.menuitem([constant('PATH_IMG'), constant('Images::IMG_MENU_FORMATION')]|join, actions[constant('Images::IMG_MENU_FORMATION')]) }}
        {{ menu.menuitem([constant('PATH_IMG'), constant('Images::IMG_MENU_EAI')]|join, actions[constant('Images::IMG_MENU_EAI')]) }}
        <br>
        {{ menu.menuitem([constant('PATH_IMG'), constant('Images::IMG_MENU_ACCUEIL')]|join, actions[constant('Images::IMG_MENU_ACCUEIL')]) }}
        {{ menu.menuitem([constant('PATH_IMG'), constant('Images::IMG_MENU_EMPLOIS')]|join, actions[constant('Images::IMG_MENU_EMPLOIS')]) }}
        <br>
        {{ menu.menuitem([constant('PATH_IMG'), constant('Images::IMG_MENU_REMU')]|join, actions[constant('Images::IMG_MENU_REMU')]) }}
        {{ menu.menuitem([constant('PATH_IMG'), constant('Images::IMG_MENU_NOTES')]|join, actions[constant('Images::IMG_MENU_NOTES')]) }}
    </div>
{% endblock %}
